package com.dys.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author: 疾风
 * @ClassName: Servlet04
 * @Description: 在目标资源中对响应状态码或者响应头所做的修改都会被忽略
 * @CreateDate: 2024/09/20
 * @Version: v1.0.0
 */
@WebServlet(urlPatterns = "/servlet04.do")
public class Servlet04 extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("执行Servlet04的service方法......");
        // 接收Servlet01传递过来的参数
        String money = req.getParameter("money");
        System.out.println("Servlet03转发过来的money：" + money);

        // 做出响应
        resp.getWriter().println("支付宝到账：" + money + "元");
    }
}
